[Xamarin.Android.Build.Tasks] fix classes-zip inception (#1142)#1180
Merged
jonpryor merged 1 commit intodotnet:d15-5-no-dtbfrom Jan 10, 2018
Merged
[Xamarin.Android.Build.Tasks] fix classes-zip inception (#1142)#1180jonpryor merged 1 commit intodotnet:d15-5-no-dtbfrom
jonpryor merged 1 commit intodotnet:d15-5-no-dtbfrom
Conversation
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=61073 Context: a296784 When we added the new `classes.zip` functionality, there was one oddity present. On the first build, everything appears to be normal. On the second build, `classes.zip` appeared to contain itself inside itself??? To make things even stranger, I wrote a unit test that contains a `Java.Lang.Object` subclass in which its type and namespace names change on each write. This worked fine on macOS, even with the oddity of `classes.zip` continually zipping itself inside itself... The new java sources would appear at the bottom of the list within the zip file. Everything broke down when I tried my unit test on Windows, the case of `classes.zip` trying to compress itself inside itself was silently failing. It was not processing any further files after the failing zip entry, and so *in theory* this situation would cause many Java stubs to be missing from the zip. Solution? Let's just put `classes.zip` up one directory. So instead of: ``` obj/Debug/android/bin/classes/classes.zip ``` Move it to: ``` obj/Debug/android/bin/classes.zip ``` This prevents the `classes` directory from containing `classes.zip`, and our strange case of `classes.zip` inception. Merry Christmas! I'm going to go play Skylanders now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=61073
Context: a296784
When we added the new
classes.zipfunctionality, there was one odditypresent. On the first build, everything appears to be normal. On the
second build,
classes.zipappeared to contain itself inside itself???To make things even stranger, I wrote a unit test that contains a
Java.Lang.Objectsubclass in which its type and namespace names changeon each write. This worked fine on macOS, even with the oddity of
classes.zipcontinually zipping itself inside itself... The new javasources would appear at the bottom of the list within the zip file.
Everything broke down when I tried my unit test on Windows, the case of
classes.ziptrying to compress itself inside itself was silentlyfailing. It was not processing any further files after the failing zip
entry, and so in theory this situation would cause many Java stubs to
be missing from the zip.
Solution? Let's just put
classes.zipup one directory.So instead of:
Move it to:
This prevents the
classesdirectory from containingclasses.zip, andour strange case of
classes.zipinception.Merry Christmas! I'm going to go play Skylanders now.